import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
driver.maximize_window()
# 浏览器名称
print(driver.name)
# 当前rul
print(driver.current_url)
# 当前页面标题
print(driver.title)
# 当前页面的源代码
# print(driver.page_source)
# 当前窗口句柄
print(driver.current_window_handle)
# 当前浏览器的所有句柄
print(driver.window_handles)

driver.quit()